package com.navi.loaddata.core.oracleEntity.cell2;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by Jay on 2018/3/9.
 */
public class EtlCell2EquipEventVPK implements Serializable {
    private String equipId;
    private Date eventStartTime;
    private String eventCode;

    @Column(name = "EQUIP_ID")
    @Id
    public String getEquipId() {
        return equipId;
    }

    public void setEquipId(String equipId) {
        this.equipId = equipId;
    }

    @Column(name = "EVENT_START_TIME")
    @Id
    @Temporal(TemporalType.TIMESTAMP)
    public Date getEventStartTime() {
        return eventStartTime;
    }

    public void setEventStartTime(Date eventStartTime) {
        this.eventStartTime = eventStartTime;
    }

    @Column(name = "EVENT_CODE")
    @Id
    public String getEventCode() {
        return eventCode;
    }

    public void setEventCode(String eventCode) {
        this.eventCode = eventCode;
    }




    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlCell2EquipEventVPK that = (EtlCell2EquipEventVPK) o;

        if (equipId != null ? !equipId.equals(that.equipId) : that.equipId != null) return false;
        if (eventStartTime != null ? !eventStartTime.equals(that.eventStartTime) : that.eventStartTime != null) return false;
        if (eventCode != null ? !eventCode.equals(that.eventCode) : that.eventCode != null)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        int result = equipId != null ? equipId.hashCode() : 0;
        result = 31 * result + (eventStartTime != null ? eventStartTime.hashCode() : 0);
        result = 31 * result + (eventCode != null ? eventCode.hashCode() : 0);
        return result;
    }
}
